import { Player, system, world } from "@minecraft/server";
import { SPAction, spManager, spTag } from "./SPManager";
import "./spCommands";
import "./spUI";
//假人死后直接清除
world.afterEvents.entityDie.subscribe((t) => {
    if (t.deadEntity.typeId == "minecraft:player" && t.deadEntity.hasTag(spTag)) {
        spManager.Remove(t.deadEntity as Player);
    }
});

system.runInterval(() => {
    SPAction.loop();
}, 20);
